Optimal. Leaf size=29 \[ \frac{a \log (\cosh (c+d x))}{d}-\frac{b \text{sech}^2(c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0283861, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {4138, 14} \[ \frac{a \log (\cosh (c+d x))}{d}-\frac{b \text{sech}^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4138
Rule 14
Rubi steps
\begin{align*} \int \left (a+b \text{sech}^2(c+d x)\right ) \tanh (c+d x) \, dx &=\frac{\operatorname{Subst}\left (\int \frac{b+a x^2}{x^3} \, dx,x,\cosh (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{b}{x^3}+\frac{a}{x}\right ) \, dx,x,\cosh (c+d x)\right )}{d}\\ &=\frac{a \log (\cosh (c+d x))}{d}-\frac{b \text{sech}^2(c+d x)}{2 d}\\ \end{align*}
Mathematica [A] time = 0.0218577, size = 29, normalized size = 1. \[ \frac{a \log (\cosh (c+d x))}{d}-\frac{b \text{sech}^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.013, size = 29, normalized size = 1. \begin{align*} -{\frac{b \left ({\rm sech} \left (dx+c\right ) \right ) ^{2}}{2\,d}}-{\frac{a\ln \left ({\rm sech} \left (dx+c\right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.1496, size = 36, normalized size = 1.24 \begin{align*} \frac{b \tanh \left (d x + c\right )^{2}}{2 \, d} + \frac{a \log \left (\cosh \left (d x + c\right )\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.08514, size = 973, normalized size = 33.55 \begin{align*} -\frac{a d x \cosh \left (d x + c\right )^{4} + 4 \, a d x \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + a d x \sinh \left (d x + c\right )^{4} + a d x + 2 \,{\left (a d x + b\right )} \cosh \left (d x + c\right )^{2} + 2 \,{\left (3 \, a d x \cosh \left (d x + c\right )^{2} + a d x + b\right )} \sinh \left (d x + c\right )^{2} -{\left (a \cosh \left (d x + c\right )^{4} + 4 \, a \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + a \sinh \left (d x + c\right )^{4} + 2 \, a \cosh \left (d x + c\right )^{2} + 2 \,{\left (3 \, a \cosh \left (d x + c\right )^{2} + a\right )} \sinh \left (d x + c\right )^{2} + 4 \,{\left (a \cosh \left (d x + c\right )^{3} + a \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + a\right )} \log \left (\frac{2 \, \cosh \left (d x + c\right )}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right ) + 4 \,{\left (a d x \cosh \left (d x + c\right )^{3} +{\left (a d x + b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{d \cosh \left (d x + c\right )^{4} + 4 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + d \sinh \left (d x + c\right )^{4} + 2 \, d \cosh \left (d x + c\right )^{2} + 2 \,{\left (3 \, d \cosh \left (d x + c\right )^{2} + d\right )} \sinh \left (d x + c\right )^{2} + 4 \,{\left (d \cosh \left (d x + c\right )^{3} + d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.726178, size = 42, normalized size = 1.45 \begin{align*} \begin{cases} a x - \frac{a \log{\left (\tanh{\left (c + d x \right )} + 1 \right )}}{d} - \frac{b \operatorname{sech}^{2}{\left (c + d x \right )}}{2 d} & \text{for}\: d \neq 0 \\x \left (a + b \operatorname{sech}^{2}{\left (c \right )}\right ) \tanh{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.19476, size = 108, normalized size = 3.72 \begin{align*} -\frac{2 \, a d x - 2 \, a \log \left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right ) + \frac{3 \, a e^{\left (4 \, d x + 4 \, c\right )} + 6 \, a e^{\left (2 \, d x + 2 \, c\right )} + 4 \, b e^{\left (2 \, d x + 2 \, c\right )} + 3 \, a}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{2}}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]